package utils

import (
	"crypto/md5"
	"encoding/hex"
	"bytes"
)

func MD5hash(str ...string) string {
	md5Ctx := md5.New()
	for _, v := range str {
		md5Ctx.Write([]byte(v))
	}
	return hex.EncodeToString(md5Ctx.Sum(nil))
}

func SringAdd(str ...string) []byte {
	var buf bytes.Buffer
	for _, v := range str {
		buf.WriteString(v)
	}
	return buf.Bytes()
}
